
//ClASS TO ADD AND REMOVE ELEMENTS FORM A TEST, SECTIONS, SUBSECTIONS, AND QUESTIONS

package model.test;

/**
 *
 * @author FELIPE
 */
public abstract class Ops {
    
    
    //ADDING ELEMENTS
    
    public static void ADDquestionTOsubSection(Question element,SubSection destination){
        destination.addQuestion(element);
    }
    
    public static void ADDsubSectionTOsection(SubSection element,Section destination){
        destination.addSubSection(element);
    }
    
    public static void ADDsectionTOtest(Section element,Test destination){
        destination.addSection(element);
    }
    
    
    //REMOVING ELEMENTS
    
    public static void REMOVEquestionFROMsubSection(Question element, SubSection from){   
        from.removeQuestion(element);  
    }
    
    public static void REMOVEsubSectionFROMsection(SubSection element, Section from){   
        from.removeSubSection(element);  
    }
    
    public static void REMOVEsectionFROMtest(Section element, Test from){   
        from.removeSection(element);  
    }
    
    
    //REPLACING ELEMENTS
    public static void REPLACEquestionINsubSection (Question newQuestion,SubSection subSection, int position){
        
        subSection.replaceQuestion(newQuestion, position);
    }
    
    
    
}
